#include "motionPlanning.h"
#include "bbpr.h"

void computePeriods(double Xpeak[], double T[]) {
    int n = 0;
    double coeffs[6] = {0, 0, 0, 0, 0, 0};
    double Xmax = 0;

    n = 5;
    coeffs[0] = 64*Xpeak[5];
    coeffs[1] = 8*T[1]*Xpeak[5] + 24*T[2]*Xpeak[5] + 64*T[3]*Xpeak[5] + 160*T[4]*Xpeak[5];
    coeffs[2] = 2*T[1]*T[2]*Xpeak[5] + 6*T[1]*T[3]*Xpeak[5] + 16*T[1]*T[4]*Xpeak[5] + 2*pow(T[2], 2)*Xpeak[5] + 18*T[2]*T[3]*Xpeak[5] + 48*T[2]*T[4]*Xpeak[5] + 20*pow(T[3], 2)*Xpeak[5] + 128*T[3]*T[4]*Xpeak[5] + 144*pow(T[4], 2)*Xpeak[5];
    coeffs[3] = T[1]*T[2]*T[3]*Xpeak[5] + 3*T[1]*T[2]*T[4]*Xpeak[5] + T[1]*pow(T[3], 2)*Xpeak[5] + 9*T[1]*T[3]*T[4]*Xpeak[5] + 10*T[1]*pow(T[4], 2)*Xpeak[5] + pow(T[2], 2)*T[3]*Xpeak[5] + 3*pow(T[2], 2)*T[4]*Xpeak[5] + 3*T[2]*pow(T[3], 2)*Xpeak[5] + 27*T[2]*T[3]*T[4]*Xpeak[5] + 30*T[2]*pow(T[4], 2)*Xpeak[5] + 2*pow(T[3], 3)*Xpeak[5] + 30*pow(T[3], 2)*T[4]*Xpeak[5] + 80*T[3]*pow(T[4], 2)*Xpeak[5] + 56*pow(T[4], 3)*Xpeak[5];
    coeffs[4] = T[1]*T[2]*T[3]*T[4]*Xpeak[5] + T[1]*T[2]*pow(T[4], 2)*Xpeak[5] + T[1]*pow(T[3], 2)*T[4]*Xpeak[5] + 3*T[1]*T[3]*pow(T[4], 2)*Xpeak[5] + 2*T[1]*pow(T[4], 3)*Xpeak[5] + pow(T[2], 2)*T[3]*T[4]*Xpeak[5] + pow(T[2], 2)*pow(T[4], 2)*Xpeak[5] + 3*T[2]*pow(T[3], 2)*T[4]*Xpeak[5] + 9*T[2]*T[3]*pow(T[4], 2)*Xpeak[5] + 6*T[2]*pow(T[4], 3)*Xpeak[5] + 2*pow(T[3], 3)*T[4]*Xpeak[5] + 10*pow(T[3], 2)*pow(T[4], 2)*Xpeak[5] + 16*T[3]*pow(T[4], 3)*Xpeak[5] + 8*pow(T[4], 4)*Xpeak[5];
    coeffs[5] = -Xpeak[0];
    T[5] = findRoot(coeffs, n);

    Xmax = (2*T[4] + 2*T[5])*(2*T[3] + 2*T[4] + 4*T[5])*(2*T[2] + 2*T[3] + 4*T[4] + 8*T[5])*T[5]*Xpeak[5]/8;

    if (Xmax > Xpeak[1]) {
        n = 4;
        coeffs[0] = 8*Xpeak[5];
        coeffs[1] = 2*T[2]*Xpeak[5] + 6*T[3]*Xpeak[5] + 16*T[4]*Xpeak[5];
        coeffs[2] = T[2]*T[3]*Xpeak[5] + 3*T[2]*T[4]*Xpeak[5] + pow(T[3], 2)*Xpeak[5] + 9*T[3]*T[4]*Xpeak[5] + 10*pow(T[4], 2)*Xpeak[5];
        coeffs[3] = T[2]*T[3]*T[4]*Xpeak[5] + T[2]*pow(T[4], 2)*Xpeak[5] + pow(T[3], 2)*T[4]*Xpeak[5] + 3*T[3]*pow(T[4], 2)*Xpeak[5] + 2*pow(T[4], 3)*Xpeak[5];
        coeffs[4] = -Xpeak[1];
        T[5] = findRoot(coeffs, n);
    } else {
        Xpeak[1] = Xmax;
    }

    Xmax = (2*T[4] + 2*T[5])*(2*T[3] + 2*T[4] + 4*T[5])*T[5]*Xpeak[5]/4;

    if (Xmax > Xpeak[2]) {
        n = 3;
        coeffs[0] = 2*Xpeak[5];
        coeffs[1] = T[3]*Xpeak[5] + 3*T[4]*Xpeak[5];
        coeffs[2] = T[3]*T[4]*Xpeak[5] + pow(T[4], 2)*Xpeak[5];
        coeffs[3] = -Xpeak[2];
        T[5] = findRoot(coeffs, n);
    } else {
        Xpeak[2] = Xmax;
    }

    Xmax = (2*T[4] + 2*T[5])*T[5]*Xpeak[5]/2;

    if (Xmax > Xpeak[3]) {
        n = 2;
        coeffs[0] = Xpeak[5];
        coeffs[1] = T[4]*Xpeak[5];
        coeffs[2] = -Xpeak[3];
        T[5] = findRoot(coeffs, n);
    } else {
        Xpeak[3] = Xmax;
    }

    Xmax = T[5]*Xpeak[5];

    if (Xmax > Xpeak[4]) {
        n = 1;
        coeffs[0] = Xpeak[5];
        coeffs[1] = -Xpeak[4];
        T[5] = findRoot(coeffs, n);
    } else {
        Xpeak[4] = Xmax;
    }

    n = 4;
    coeffs[0] = 8*T[5]*Xpeak[5];
    coeffs[1] = 2*T[1]*T[5]*Xpeak[5] + 6*T[2]*T[5]*Xpeak[5] + 16*T[3]*T[5]*Xpeak[5] + 56*pow(T[5], 2)*Xpeak[5];
    coeffs[2] = T[1]*T[2]*T[5]*Xpeak[5] + 3*T[1]*T[3]*T[5]*Xpeak[5] + 10*T[1]*pow(T[5], 2)*Xpeak[5] + pow(T[2], 2)*T[5]*Xpeak[5] + 9*T[2]*T[3]*T[5]*Xpeak[5] + 30*T[2]*pow(T[5], 2)*Xpeak[5] + 10*pow(T[3], 2)*T[5]*Xpeak[5] + 80*T[3]*pow(T[5], 2)*Xpeak[5] + 144*pow(T[5], 3)*Xpeak[5];
    coeffs[3] = T[1]*T[2]*T[3]*T[5]*Xpeak[5] + 3*T[1]*T[2]*pow(T[5], 2)*Xpeak[5] + T[1]*pow(T[3], 2)*T[5]*Xpeak[5] + 9*T[1]*T[3]*pow(T[5], 2)*Xpeak[5] + 16*T[1]*pow(T[5], 3)*Xpeak[5] + pow(T[2], 2)*T[3]*T[5]*Xpeak[5] + 3*pow(T[2], 2)*pow(T[5], 2)*Xpeak[5] + 3*T[2]*pow(T[3], 2)*T[5]*Xpeak[5] + 27*T[2]*T[3]*pow(T[5], 2)*Xpeak[5] + 48*T[2]*pow(T[5], 3)*Xpeak[5] + 2*pow(T[3], 3)*T[5]*Xpeak[5] + 30*pow(T[3], 2)*pow(T[5], 2)*Xpeak[5] + 128*T[3]*pow(T[5], 3)*Xpeak[5] + 160*pow(T[5], 4)*Xpeak[5];
    coeffs[4] = T[1]*T[2]*T[3]*pow(T[5], 2)*Xpeak[5] + 2*T[1]*T[2]*pow(T[5], 3)*Xpeak[5] + T[1]*pow(T[3], 2)*pow(T[5], 2)*Xpeak[5] + 6*T[1]*T[3]*pow(T[5], 3)*Xpeak[5] + 8*T[1]*pow(T[5], 4)*Xpeak[5] + pow(T[2], 2)*T[3]*pow(T[5], 2)*Xpeak[5] + 2*pow(T[2], 2)*pow(T[5], 3)*Xpeak[5] + 3*T[2]*pow(T[3], 2)*pow(T[5], 2)*Xpeak[5] + 18*T[2]*T[3]*pow(T[5], 3)*Xpeak[5] + 24*T[2]*pow(T[5], 4)*Xpeak[5] + 2*pow(T[3], 3)*pow(T[5], 2)*Xpeak[5] + 20*pow(T[3], 2)*pow(T[5], 3)*Xpeak[5] + 64*T[3]*pow(T[5], 4)*Xpeak[5] + 64*pow(T[5], 5)*Xpeak[5] - Xpeak[0];
    T[4] = findRoot(coeffs, n);

    Xmax = (2*T[4] + 2*T[5])*(2*T[3] + 2*T[4] + 4*T[5])*(2*T[2] + 2*T[3] + 4*T[4] + 8*T[5])*T[5]*Xpeak[5]/8;

    if (Xmax > Xpeak[1]) {
        n = 3;
        coeffs[0] = 2*T[5]*Xpeak[5];
        coeffs[1] = T[2]*T[5]*Xpeak[5] + 3*T[3]*T[5]*Xpeak[5] + 10*pow(T[5], 2)*Xpeak[5];
        coeffs[2] = T[2]*T[3]*T[5]*Xpeak[5] + 3*T[2]*pow(T[5], 2)*Xpeak[5] + pow(T[3], 2)*T[5]*Xpeak[5] + 9*T[3]*pow(T[5], 2)*Xpeak[5] + 16*pow(T[5], 3)*Xpeak[5];
        coeffs[3] = T[2]*T[3]*pow(T[5], 2)*Xpeak[5] + 2*T[2]*pow(T[5], 3)*Xpeak[5] + pow(T[3], 2)*pow(T[5], 2)*Xpeak[5] + 6*T[3]*pow(T[5], 3)*Xpeak[5] + 8*pow(T[5], 4)*Xpeak[5] - Xpeak[1];
        T[4] = findRoot(coeffs, n);
    } else {
        Xpeak[1] = Xmax;
    }

    Xmax = (2*T[4] + 2*T[5])*(2*T[3] + 2*T[4] + 4*T[5])*T[5]*Xpeak[5]/4;

    if (Xmax > Xpeak[2]) {
        n = 2;
        coeffs[0] = T[5]*Xpeak[5];
        coeffs[1] = T[3]*T[5]*Xpeak[5] + 3*pow(T[5], 2)*Xpeak[5];
        coeffs[2] = T[3]*pow(T[5], 2)*Xpeak[5] + 2*pow(T[5], 3)*Xpeak[5] - Xpeak[2];
        T[4] = findRoot(coeffs, n);
    } else {
        Xpeak[2] = Xmax;
    }

    Xmax = (2*T[4] + 2*T[5])*T[5]*Xpeak[5]/2;

    if (Xmax > Xpeak[3]) {
        n = 1;
        coeffs[0] = T[5]*Xpeak[5];
        coeffs[1] = pow(T[5], 2)*Xpeak[5] - Xpeak[3];
        T[4] = findRoot(coeffs, n);
    } else {
        Xpeak[3] = Xmax;
    }

    n = 3;
    coeffs[0] = 2*T[4]*T[5]*Xpeak[5] + 2*pow(T[5], 2)*Xpeak[5];
    coeffs[1] = T[1]*T[4]*T[5]*Xpeak[5] + T[1]*pow(T[5], 2)*Xpeak[5] + 3*T[2]*T[4]*T[5]*Xpeak[5] + 3*T[2]*pow(T[5], 2)*Xpeak[5] + 10*pow(T[4], 2)*T[5]*Xpeak[5] + 30*T[4]*pow(T[5], 2)*Xpeak[5] + 20*pow(T[5], 3)*Xpeak[5];
    coeffs[2] = T[1]*T[2]*T[4]*T[5]*Xpeak[5] + T[1]*T[2]*pow(T[5], 2)*Xpeak[5] + 3*T[1]*pow(T[4], 2)*T[5]*Xpeak[5] + 9*T[1]*T[4]*pow(T[5], 2)*Xpeak[5] + 6*T[1]*pow(T[5], 3)*Xpeak[5] + pow(T[2], 2)*T[4]*T[5]*Xpeak[5] + pow(T[2], 2)*pow(T[5], 2)*Xpeak[5] + 9*T[2]*pow(T[4], 2)*T[5]*Xpeak[5] + 27*T[2]*T[4]*pow(T[5], 2)*Xpeak[5] + 18*T[2]*pow(T[5], 3)*Xpeak[5] + 16*pow(T[4], 3)*T[5]*Xpeak[5] + 80*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 128*T[4]*pow(T[5], 3)*Xpeak[5] + 64*pow(T[5], 4)*Xpeak[5];
    coeffs[3] = T[1]*T[2]*pow(T[4], 2)*T[5]*Xpeak[5] + 3*T[1]*T[2]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[1]*T[2]*pow(T[5], 3)*Xpeak[5] + 2*T[1]*pow(T[4], 3)*T[5]*Xpeak[5] + 10*T[1]*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 16*T[1]*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[1]*pow(T[5], 4)*Xpeak[5] + pow(T[2], 2)*pow(T[4], 2)*T[5]*Xpeak[5] + 3*pow(T[2], 2)*T[4]*pow(T[5], 2)*Xpeak[5] + 2*pow(T[2], 2)*pow(T[5], 3)*Xpeak[5] + 6*T[2]*pow(T[4], 3)*T[5]*Xpeak[5] + 30*T[2]*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 48*T[2]*T[4]*pow(T[5], 3)*Xpeak[5] + 24*T[2]*pow(T[5], 4)*Xpeak[5] + 8*pow(T[4], 4)*T[5]*Xpeak[5] + 56*pow(T[4], 3)*pow(T[5], 2)*Xpeak[5] + 144*pow(T[4], 2)*pow(T[5], 3)*Xpeak[5] + 160*T[4]*pow(T[5], 4)*Xpeak[5] + 64*pow(T[5], 5)*Xpeak[5] - Xpeak[0];
    T[3] = findRoot(coeffs, n);

    Xmax = (2*T[4] + 2*T[5])*(2*T[3] + 2*T[4] + 4*T[5])*(2*T[2] + 2*T[3] + 4*T[4] + 8*T[5])*T[5]*Xpeak[5]/8;

    if (Xmax > Xpeak[1]) {
        n = 2;
        coeffs[0] = T[4]*T[5]*Xpeak[5] + pow(T[5], 2)*Xpeak[5];
        coeffs[1] = T[2]*T[4]*T[5]*Xpeak[5] + T[2]*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[5] + 9*T[4]*pow(T[5], 2)*Xpeak[5] + 6*pow(T[5], 3)*Xpeak[5];
        coeffs[2] = T[2]*pow(T[4], 2)*T[5]*Xpeak[5] + 3*T[2]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[2]*pow(T[5], 3)*Xpeak[5] + 2*pow(T[4], 3)*T[5]*Xpeak[5] + 10*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 16*T[4]*pow(T[5], 3)*Xpeak[5] + 8*pow(T[5], 4)*Xpeak[5] - Xpeak[1];
        T[3] = findRoot(coeffs, n);
    } else {
        Xpeak[1] = Xmax;
    }

    Xmax = (2*T[4] + 2*T[5])*(2*T[3] + 2*T[4] + 4*T[5])*T[5]*Xpeak[5]/4;

    if (Xmax > Xpeak[2]) {
        n = 1;
        coeffs[0] = T[4]*T[5]*Xpeak[5] + pow(T[5], 2)*Xpeak[5];
        coeffs[1] = pow(T[4], 2)*T[5]*Xpeak[5] + 3*T[4]*pow(T[5], 2)*Xpeak[5] + 2*pow(T[5], 3)*Xpeak[5] - Xpeak[2];
        T[3] = findRoot(coeffs, n);
    } else {
        Xpeak[2] = Xmax;
    }

    n = 2;
    coeffs[0] = T[3]*T[4]*T[5]*Xpeak[5] + T[3]*pow(T[5], 2)*Xpeak[5] + pow(T[4], 2)*T[5]*Xpeak[5] + 3*T[4]*pow(T[5], 2)*Xpeak[5] + 2*pow(T[5], 3)*Xpeak[5];
    coeffs[1] = T[1]*T[3]*T[4]*T[5]*Xpeak[5] + T[1]*T[3]*pow(T[5], 2)*Xpeak[5] + T[1]*pow(T[4], 2)*T[5]*Xpeak[5] + 3*T[1]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[1]*pow(T[5], 3)*Xpeak[5] + 3*pow(T[3], 2)*T[4]*T[5]*Xpeak[5] + 3*pow(T[3], 2)*pow(T[5], 2)*Xpeak[5] + 9*T[3]*pow(T[4], 2)*T[5]*Xpeak[5] + 27*T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 18*T[3]*pow(T[5], 3)*Xpeak[5] + 6*pow(T[4], 3)*T[5]*Xpeak[5] + 30*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 48*T[4]*pow(T[5], 3)*Xpeak[5] + 24*pow(T[5], 4)*Xpeak[5];
    coeffs[2] = T[1]*pow(T[3], 2)*T[4]*T[5]*Xpeak[5] + T[1]*pow(T[3], 2)*pow(T[5], 2)*Xpeak[5] + 3*T[1]*T[3]*pow(T[4], 2)*T[5]*Xpeak[5] + 9*T[1]*T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 6*T[1]*T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[1]*pow(T[4], 3)*T[5]*Xpeak[5] + 10*T[1]*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 16*T[1]*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[1]*pow(T[5], 4)*Xpeak[5] + 2*pow(T[3], 3)*T[4]*T[5]*Xpeak[5] + 2*pow(T[3], 3)*pow(T[5], 2)*Xpeak[5] + 10*pow(T[3], 2)*pow(T[4], 2)*T[5]*Xpeak[5] + 30*pow(T[3], 2)*T[4]*pow(T[5], 2)*Xpeak[5] + 20*pow(T[3], 2)*pow(T[5], 3)*Xpeak[5] + 16*T[3]*pow(T[4], 3)*T[5]*Xpeak[5] + 80*T[3]*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 128*T[3]*T[4]*pow(T[5], 3)*Xpeak[5] + 64*T[3]*pow(T[5], 4)*Xpeak[5] + 8*pow(T[4], 4)*T[5]*Xpeak[5] + 56*pow(T[4], 3)*pow(T[5], 2)*Xpeak[5] + 144*pow(T[4], 2)*pow(T[5], 3)*Xpeak[5] + 160*T[4]*pow(T[5], 4)*Xpeak[5] + 64*pow(T[5], 5)*Xpeak[5] - Xpeak[0];
    T[2] = findRoot(coeffs, n);

    Xmax = (2*T[4] + 2*T[5])*(2*T[3] + 2*T[4] + 4*T[5])*(2*T[2] + 2*T[3] + 4*T[4] + 8*T[5])*T[5]*Xpeak[5]/8;

    if (Xmax > Xpeak[1]) {
        n = 1;
        coeffs[0] = T[3]*T[4]*T[5]*Xpeak[5] + T[3]*pow(T[5], 2)*Xpeak[5] + pow(T[4], 2)*T[5]*Xpeak[5] + 3*T[4]*pow(T[5], 2)*Xpeak[5] + 2*pow(T[5], 3)*Xpeak[5];
        coeffs[1] = pow(T[3], 2)*T[4]*T[5]*Xpeak[5] + pow(T[3], 2)*pow(T[5], 2)*Xpeak[5] + 3*T[3]*pow(T[4], 2)*T[5]*Xpeak[5] + 9*T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 6*T[3]*pow(T[5], 3)*Xpeak[5] + 2*pow(T[4], 3)*T[5]*Xpeak[5] + 10*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 16*T[4]*pow(T[5], 3)*Xpeak[5] + 8*pow(T[5], 4)*Xpeak[5] - Xpeak[1];
        T[2] = findRoot(coeffs, n);
    } else {
        Xpeak[1] = Xmax;
    }

    n = 1;
    coeffs[0] = T[2]*T[3]*T[4]*T[5]*Xpeak[5] + T[2]*T[3]*pow(T[5], 2)*Xpeak[5] + T[2]*pow(T[4], 2)*T[5]*Xpeak[5] + 3*T[2]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[2]*pow(T[5], 3)*Xpeak[5] + pow(T[3], 2)*T[4]*T[5]*Xpeak[5] + pow(T[3], 2)*pow(T[5], 2)*Xpeak[5] + 3*T[3]*pow(T[4], 2)*T[5]*Xpeak[5] + 9*T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 6*T[3]*pow(T[5], 3)*Xpeak[5] + 2*pow(T[4], 3)*T[5]*Xpeak[5] + 10*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 16*T[4]*pow(T[5], 3)*Xpeak[5] + 8*pow(T[5], 4)*Xpeak[5];
    coeffs[1] = pow(T[2], 2)*T[3]*T[4]*T[5]*Xpeak[5] + pow(T[2], 2)*T[3]*pow(T[5], 2)*Xpeak[5] + pow(T[2], 2)*pow(T[4], 2)*T[5]*Xpeak[5] + 3*pow(T[2], 2)*T[4]*pow(T[5], 2)*Xpeak[5] + 2*pow(T[2], 2)*pow(T[5], 3)*Xpeak[5] + 3*T[2]*pow(T[3], 2)*T[4]*T[5]*Xpeak[5] + 3*T[2]*pow(T[3], 2)*pow(T[5], 2)*Xpeak[5] + 9*T[2]*T[3]*pow(T[4], 2)*T[5]*Xpeak[5] + 27*T[2]*T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 18*T[2]*T[3]*pow(T[5], 3)*Xpeak[5] + 6*T[2]*pow(T[4], 3)*T[5]*Xpeak[5] + 30*T[2]*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 48*T[2]*T[4]*pow(T[5], 3)*Xpeak[5] + 24*T[2]*pow(T[5], 4)*Xpeak[5] + 2*pow(T[3], 3)*T[4]*T[5]*Xpeak[5] + 2*pow(T[3], 3)*pow(T[5], 2)*Xpeak[5] + 10*pow(T[3], 2)*pow(T[4], 2)*T[5]*Xpeak[5] + 30*pow(T[3], 2)*T[4]*pow(T[5], 2)*Xpeak[5] + 20*pow(T[3], 2)*pow(T[5], 3)*Xpeak[5] + 16*T[3]*pow(T[4], 3)*T[5]*Xpeak[5] + 80*T[3]*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 128*T[3]*T[4]*pow(T[5], 3)*Xpeak[5] + 64*T[3]*pow(T[5], 4)*Xpeak[5] + 8*pow(T[4], 4)*T[5]*Xpeak[5] + 56*pow(T[4], 3)*pow(T[5], 2)*Xpeak[5] + 144*pow(T[4], 2)*pow(T[5], 3)*Xpeak[5] + 160*T[4]*pow(T[5], 4)*Xpeak[5] + 64*pow(T[5], 5)*Xpeak[5] - Xpeak[0];
    T[1] = findRoot(coeffs, n);

}

double getSetpoint(double Xpeak[], double T[], double t) {
    if (T[0] <= t && t <= T[5]) {
        return pow((t-(T[0])), 5)*Xpeak[5]/120;
    }
    if (T[5] <= t && t <= T[4] + T[5]) {
        return pow((t-(T[5])), 4)*Xpeak[4]/24 + pow((t-(T[5])), 3)*pow(T[5], 2)*Xpeak[5]/12 + pow((t-(T[5])), 2)*pow(T[5], 3)*Xpeak[5]/12 + (t-(T[5]))*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/120;
    }
    if (T[4] + T[5] <= t && t <= T[4] + 2*T[5]) {
        return -pow((t-(T[4] + T[5])), 5)*Xpeak[5]/120 + pow((t-(T[4] + T[5])), 4)*T[5]*Xpeak[5]/24 + pow((t-(T[4] + T[5])), 3)*(T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12) + pow((t-(T[4] + T[5])), 2)*(pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12) + (t-(T[4] + T[5]))*(pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24) + pow(T[4], 4)*Xpeak[4]/24 + pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/120;
    }
    if (T[4] + 2*T[5] <= t && t <= T[3] + T[4] + 2*T[5]) {
        return pow((t-(T[4] + 2*T[5])), 3)*Xpeak[3]/6 + pow((t-(T[4] + 2*T[5])), 2)*(pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2) + (t-(T[4] + 2*T[5]))*(pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + pow(T[4], 4)*Xpeak[4]/24 + pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/24;
    }
    if (T[3] + T[4] + 2*T[5] <= t && t <= T[3] + T[4] + 3*T[5]) {
        return -pow((t-(T[3] + T[4] + 2*T[5])), 5)*Xpeak[5]/120 + pow((t-(T[3] + T[4] + 2*T[5])), 3)*(T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6) + pow((t-(T[3] + T[4] + 2*T[5])), 2)*(T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2) + (t-(T[3] + T[4] + 2*T[5]))*(pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + pow(T[3], 3)*Xpeak[3]/6 + pow(T[4], 4)*Xpeak[4]/24 + pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/24;
    }
    if (T[3] + T[4] + 3*T[5] <= t && t <= T[3] + 2*T[4] + 3*T[5]) {
        return -pow((t-(T[3] + T[4] + 3*T[5])), 4)*Xpeak[4]/24 + pow((t-(T[3] + T[4] + 3*T[5])), 3)*(T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12) + pow((t-(T[3] + T[4] + 3*T[5])), 2)*(T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12) + (t-(T[3] + T[4] + 3*T[5]))*(pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + pow(T[3], 3)*Xpeak[3]/6 + pow(T[4], 4)*Xpeak[4]/24 + pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/30;
    }
    if (T[3] + 2*T[4] + 3*T[5] <= t && t <= T[3] + 2*T[4] + 4*T[5]) {
        return pow((t-(T[3] + 2*T[4] + 3*T[5])), 5)*Xpeak[5]/120 - pow((t-(T[3] + 2*T[4] + 3*T[5])), 4)*T[5]*Xpeak[5]/24 + pow((t-(T[3] + 2*T[4] + 3*T[5])), 3)*pow(T[5], 2)*Xpeak[5]/12 + pow((t-(T[3] + 2*T[4] + 3*T[5])), 2)*(T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12) + (t-(T[3] + 2*T[4] + 3*T[5]))*(pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + pow(T[3], 3)*Xpeak[3]/6 + pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/30;
    }
    if (T[3] + 2*T[4] + 4*T[5] <= t && t <= T[2] + T[3] + 2*T[4] + 4*T[5]) {
        return pow((t-(T[3] + 2*T[4] + 4*T[5])), 2)*Xpeak[2]/2 + (t-(T[3] + 2*T[4] + 4*T[5]))*(pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5]) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + pow(T[3], 3)*Xpeak[3]/6 + pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/12;
    }
    if (T[2] + T[3] + 2*T[4] + 4*T[5] <= t && t <= T[2] + T[3] + 2*T[4] + 5*T[5]) {
        return -pow((t-(T[2] + T[3] + 2*T[4] + 4*T[5])), 5)*Xpeak[5]/120 + pow((t-(T[2] + T[3] + 2*T[4] + 4*T[5])), 2)*(T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5]) + (t-(T[2] + T[3] + 2*T[4] + 4*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5]) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + pow(T[2], 2)*Xpeak[2]/2 + pow(T[3], 3)*Xpeak[3]/6 + pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/12;
    }
    if (T[2] + T[3] + 2*T[4] + 5*T[5] <= t && t <= T[2] + T[3] + 3*T[4] + 5*T[5]) {
        return -pow((t-(T[2] + T[3] + 2*T[4] + 5*T[5])), 4)*Xpeak[4]/24 - pow((t-(T[2] + T[3] + 2*T[4] + 5*T[5])), 3)*pow(T[5], 2)*Xpeak[5]/12 + pow((t-(T[2] + T[3] + 2*T[4] + 5*T[5])), 2)*(T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12) + (t-(T[2] + T[3] + 2*T[4] + 5*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + pow(T[2], 2)*Xpeak[2]/2 + pow(T[3], 3)*Xpeak[3]/6 + pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + 3*pow(T[5], 5)*Xpeak[5]/40;
    }
    if (T[2] + T[3] + 3*T[4] + 5*T[5] <= t && t <= T[2] + T[3] + 3*T[4] + 6*T[5]) {
        return pow((t-(T[2] + T[3] + 3*T[4] + 5*T[5])), 5)*Xpeak[5]/120 - pow((t-(T[2] + T[3] + 3*T[4] + 5*T[5])), 4)*T[5]*Xpeak[5]/24 + pow((t-(T[2] + T[3] + 3*T[4] + 5*T[5])), 3)*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12) + pow((t-(T[2] + T[3] + 3*T[4] + 5*T[5])), 2)*(T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12) + (t-(T[2] + T[3] + 3*T[4] + 5*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + pow(T[2], 2)*Xpeak[2]/2 + pow(T[3], 3)*Xpeak[3]/6 - pow(T[4], 4)*Xpeak[4]/24 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + 3*pow(T[5], 5)*Xpeak[5]/40;
    }
    if (T[2] + T[3] + 3*T[4] + 6*T[5] <= t && t <= T[2] + 2*T[3] + 3*T[4] + 6*T[5]) {
        return -pow((t-(T[2] + T[3] + 3*T[4] + 6*T[5])), 3)*Xpeak[3]/6 + pow((t-(T[2] + T[3] + 3*T[4] + 6*T[5])), 2)*(T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2) + (t-(T[2] + T[3] + 3*T[4] + 6*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + pow(T[2], 2)*Xpeak[2]/2 + pow(T[3], 3)*Xpeak[3]/6 - pow(T[4], 4)*Xpeak[4]/24 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/24;
    }
    if (T[2] + 2*T[3] + 3*T[4] + 6*T[5] <= t && t <= T[2] + 2*T[3] + 3*T[4] + 7*T[5]) {
        return pow((t-(T[2] + 2*T[3] + 3*T[4] + 6*T[5])), 5)*Xpeak[5]/120 + pow((t-(T[2] + 2*T[3] + 3*T[4] + 6*T[5])), 3)*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6) + pow((t-(T[2] + 2*T[3] + 3*T[4] + 6*T[5])), 2)*(pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2) + (t-(T[2] + 2*T[3] + 3*T[4] + 6*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + pow(T[2], 2)*Xpeak[2]/2 - pow(T[4], 4)*Xpeak[4]/24 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/24;
    }
    if (T[2] + 2*T[3] + 3*T[4] + 7*T[5] <= t && t <= T[2] + 2*T[3] + 4*T[4] + 7*T[5]) {
        return pow((t-(T[2] + 2*T[3] + 3*T[4] + 7*T[5])), 4)*Xpeak[4]/24 + pow((t-(T[2] + 2*T[3] + 3*T[4] + 7*T[5])), 3)*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12) + pow((t-(T[2] + 2*T[3] + 3*T[4] + 7*T[5])), 2)*(pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12) + (t-(T[2] + 2*T[3] + 3*T[4] + 7*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + pow(T[2], 2)*Xpeak[2]/2 - pow(T[4], 4)*Xpeak[4]/24 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/20;
    }
    if (T[2] + 2*T[3] + 4*T[4] + 7*T[5] <= t && t <= T[2] + 2*T[3] + 4*T[4] + 8*T[5]) {
        return -pow((t-(T[2] + 2*T[3] + 4*T[4] + 7*T[5])), 5)*Xpeak[5]/120 + pow((t-(T[2] + 2*T[3] + 4*T[4] + 7*T[5])), 4)*T[5]*Xpeak[5]/24 - pow((t-(T[2] + 2*T[3] + 4*T[4] + 7*T[5])), 3)*pow(T[5], 2)*Xpeak[5]/12 + pow((t-(T[2] + 2*T[3] + 4*T[4] + 7*T[5])), 2)*pow(T[5], 3)*Xpeak[5]/12 + (t-(T[2] + 2*T[3] + 4*T[4] + 7*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + pow(T[2], 2)*Xpeak[2]/2 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/20;
    }
    if (T[2] + 2*T[3] + 4*T[4] + 8*T[5] <= t && t <= T[1] + T[2] + 2*T[3] + 4*T[4] + 8*T[5]) {
        return (t-(T[2] + 2*T[3] + 4*T[4] + 8*T[5]))*Xpeak[1] + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + pow(T[2], 2)*Xpeak[2]/2 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/12;
    }
    if (T[1] + T[2] + 2*T[3] + 4*T[4] + 8*T[5] <= t && t <= T[1] + T[2] + 2*T[3] + 4*T[4] + 9*T[5]) {
        return -pow((t-(T[1] + T[2] + 2*T[3] + 4*T[4] + 8*T[5])), 5)*Xpeak[5]/120 + (t-(T[1] + T[2] + 2*T[3] + 4*T[4] + 8*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5]) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + T[1]*Xpeak[1] + pow(T[2], 2)*Xpeak[2]/2 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/12;
    }
    if (T[1] + T[2] + 2*T[3] + 4*T[4] + 9*T[5] <= t && t <= T[1] + T[2] + 2*T[3] + 5*T[4] + 9*T[5]) {
        return -pow((t-(T[1] + T[2] + 2*T[3] + 4*T[4] + 9*T[5])), 4)*Xpeak[4]/24 - pow((t-(T[1] + T[2] + 2*T[3] + 4*T[4] + 9*T[5])), 3)*pow(T[5], 2)*Xpeak[5]/12 - pow((t-(T[1] + T[2] + 2*T[3] + 4*T[4] + 9*T[5])), 2)*pow(T[5], 3)*Xpeak[5]/12 + (t-(T[1] + T[2] + 2*T[3] + 4*T[4] + 9*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] + pow(T[2], 2)*Xpeak[2]/2 + pow(T[4], 2)*pow(T[5], 3)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + 3*pow(T[5], 5)*Xpeak[5]/40;
    }
    if (T[1] + T[2] + 2*T[3] + 5*T[4] + 9*T[5] <= t && t <= T[1] + T[2] + 2*T[3] + 5*T[4] + 10*T[5]) {
        return pow((t-(T[1] + T[2] + 2*T[3] + 5*T[4] + 9*T[5])), 5)*Xpeak[5]/120 - pow((t-(T[1] + T[2] + 2*T[3] + 5*T[4] + 9*T[5])), 4)*T[5]*Xpeak[5]/24 + pow((t-(T[1] + T[2] + 2*T[3] + 5*T[4] + 9*T[5])), 3)*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12) + pow((t-(T[1] + T[2] + 2*T[3] + 5*T[4] + 9*T[5])), 2)*(-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12) + (t-(T[1] + T[2] + 2*T[3] + 5*T[4] + 9*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] + pow(T[2], 2)*Xpeak[2]/2 - pow(T[4], 4)*Xpeak[4]/24 - pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + 3*pow(T[5], 5)*Xpeak[5]/40;
    }
    if (T[1] + T[2] + 2*T[3] + 5*T[4] + 10*T[5] <= t && t <= T[1] + T[2] + 3*T[3] + 5*T[4] + 10*T[5]) {
        return -pow((t-(T[1] + T[2] + 2*T[3] + 5*T[4] + 10*T[5])), 3)*Xpeak[3]/6 + pow((t-(T[1] + T[2] + 2*T[3] + 5*T[4] + 10*T[5])), 2)*(-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2) + (t-(T[1] + T[2] + 2*T[3] + 5*T[4] + 10*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] + pow(T[2], 2)*Xpeak[2]/2 - pow(T[4], 4)*Xpeak[4]/24 - pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/24;
    }
    if (T[1] + T[2] + 3*T[3] + 5*T[4] + 10*T[5] <= t && t <= T[1] + T[2] + 3*T[3] + 5*T[4] + 11*T[5]) {
        return pow((t-(T[1] + T[2] + 3*T[3] + 5*T[4] + 10*T[5])), 5)*Xpeak[5]/120 + pow((t-(T[1] + T[2] + 3*T[3] + 5*T[4] + 10*T[5])), 3)*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6) + pow((t-(T[1] + T[2] + 3*T[3] + 5*T[4] + 10*T[5])), 2)*(-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2) + (t-(T[1] + T[2] + 3*T[3] + 5*T[4] + 10*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] + pow(T[2], 2)*Xpeak[2]/2 - pow(T[3], 3)*Xpeak[3]/6 - pow(T[4], 4)*Xpeak[4]/24 - pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/24;
    }
    if (T[1] + T[2] + 3*T[3] + 5*T[4] + 11*T[5] <= t && t <= T[1] + T[2] + 3*T[3] + 6*T[4] + 11*T[5]) {
        return pow((t-(T[1] + T[2] + 3*T[3] + 5*T[4] + 11*T[5])), 4)*Xpeak[4]/24 + pow((t-(T[1] + T[2] + 3*T[3] + 5*T[4] + 11*T[5])), 3)*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12) + pow((t-(T[1] + T[2] + 3*T[3] + 5*T[4] + 11*T[5])), 2)*(-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12) + (t-(T[1] + T[2] + 3*T[3] + 5*T[4] + 11*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] + pow(T[2], 2)*Xpeak[2]/2 - pow(T[3], 3)*Xpeak[3]/6 - pow(T[4], 4)*Xpeak[4]/24 - pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/20;
    }
    if (T[1] + T[2] + 3*T[3] + 6*T[4] + 11*T[5] <= t && t <= T[1] + T[2] + 3*T[3] + 6*T[4] + 12*T[5]) {
        return -pow((t-(T[1] + T[2] + 3*T[3] + 6*T[4] + 11*T[5])), 5)*Xpeak[5]/120 + pow((t-(T[1] + T[2] + 3*T[3] + 6*T[4] + 11*T[5])), 4)*T[5]*Xpeak[5]/24 - pow((t-(T[1] + T[2] + 3*T[3] + 6*T[4] + 11*T[5])), 3)*pow(T[5], 2)*Xpeak[5]/12 + pow((t-(T[1] + T[2] + 3*T[3] + 6*T[4] + 11*T[5])), 2)*(-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12) + (t-(T[1] + T[2] + 3*T[3] + 6*T[4] + 11*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] + pow(T[2], 2)*Xpeak[2]/2 - pow(T[3], 3)*Xpeak[3]/6 - pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/20;
    }
    if (T[1] + T[2] + 3*T[3] + 6*T[4] + 12*T[5] <= t && t <= T[1] + 2*T[2] + 3*T[3] + 6*T[4] + 12*T[5]) {
        return -pow((t-(T[1] + T[2] + 3*T[3] + 6*T[4] + 12*T[5])), 2)*Xpeak[2]/2 + (t-(T[1] + T[2] + 3*T[3] + 6*T[4] + 12*T[5]))*(T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5]) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] + pow(T[2], 2)*Xpeak[2]/2 - pow(T[3], 3)*Xpeak[3]/6 - pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24;
    }
    if (T[1] + 2*T[2] + 3*T[3] + 6*T[4] + 12*T[5] <= t && t <= T[1] + 2*T[2] + 3*T[3] + 6*T[4] + 13*T[5]) {
        return pow((t-(T[1] + 2*T[2] + 3*T[3] + 6*T[4] + 12*T[5])), 5)*Xpeak[5]/120 + pow((t-(T[1] + 2*T[2] + 3*T[3] + 6*T[4] + 12*T[5])), 2)*(-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - pow(T[5], 3)*Xpeak[5]) + (t-(T[1] + 2*T[2] + 3*T[3] + 6*T[4] + 12*T[5]))*(pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5]) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] - pow(T[3], 3)*Xpeak[3]/6 - pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24;
    }
    if (T[1] + 2*T[2] + 3*T[3] + 6*T[4] + 13*T[5] <= t && t <= T[1] + 2*T[2] + 3*T[3] + 7*T[4] + 13*T[5]) {
        return pow((t-(T[1] + 2*T[2] + 3*T[3] + 6*T[4] + 13*T[5])), 4)*Xpeak[4]/24 + pow((t-(T[1] + 2*T[2] + 3*T[3] + 6*T[4] + 13*T[5])), 3)*pow(T[5], 2)*Xpeak[5]/12 + pow((t-(T[1] + 2*T[2] + 3*T[3] + 6*T[4] + 13*T[5])), 2)*(-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12) + (t-(T[1] + 2*T[2] + 3*T[3] + 6*T[4] + 13*T[5]))*(pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] - pow(T[3], 3)*Xpeak[3]/6 - pow(T[4], 3)*pow(T[5], 2)*Xpeak[5]/12 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/120;
    }
    if (T[1] + 2*T[2] + 3*T[3] + 7*T[4] + 13*T[5] <= t && t <= T[1] + 2*T[2] + 3*T[3] + 7*T[4] + 14*T[5]) {
        return -pow((t-(T[1] + 2*T[2] + 3*T[3] + 7*T[4] + 13*T[5])), 5)*Xpeak[5]/120 + pow((t-(T[1] + 2*T[2] + 3*T[3] + 7*T[4] + 13*T[5])), 4)*T[5]*Xpeak[5]/24 + pow((t-(T[1] + 2*T[2] + 3*T[3] + 7*T[4] + 13*T[5])), 3)*(T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12) + pow((t-(T[1] + 2*T[2] + 3*T[3] + 7*T[4] + 13*T[5])), 2)*(-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12) + (t-(T[1] + 2*T[2] + 3*T[3] + 7*T[4] + 13*T[5]))*(pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] - pow(T[3], 3)*Xpeak[3]/6 + pow(T[4], 4)*Xpeak[4]/24 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/120;
    }
    if (T[1] + 2*T[2] + 3*T[3] + 7*T[4] + 14*T[5] <= t && t <= T[1] + 2*T[2] + 4*T[3] + 7*T[4] + 14*T[5]) {
        return pow((t-(T[1] + 2*T[2] + 3*T[3] + 7*T[4] + 14*T[5])), 3)*Xpeak[3]/6 + pow((t-(T[1] + 2*T[2] + 3*T[3] + 7*T[4] + 14*T[5])), 2)*(-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2) + (t-(T[1] + 2*T[2] + 3*T[3] + 7*T[4] + 14*T[5]))*(pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] - pow(T[3], 3)*Xpeak[3]/6 + pow(T[4], 4)*Xpeak[4]/24 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/24;
    }
    if (T[1] + 2*T[2] + 4*T[3] + 7*T[4] + 14*T[5] <= t && t <= T[1] + 2*T[2] + 4*T[3] + 7*T[4] + 15*T[5]) {
        return -pow((t-(T[1] + 2*T[2] + 4*T[3] + 7*T[4] + 14*T[5])), 5)*Xpeak[5]/120 + pow((t-(T[1] + 2*T[2] + 4*T[3] + 7*T[4] + 14*T[5])), 3)*(T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6) + pow((t-(T[1] + 2*T[2] + 4*T[3] + 7*T[4] + 14*T[5])), 2)*(-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2) + (t-(T[1] + 2*T[2] + 4*T[3] + 7*T[4] + 14*T[5]))*(pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] + pow(T[4], 4)*Xpeak[4]/24 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/24;
    }
    if (T[1] + 2*T[2] + 4*T[3] + 7*T[4] + 15*T[5] <= t && t <= T[1] + 2*T[2] + 4*T[3] + 8*T[4] + 15*T[5]) {
        return -pow((t-(T[1] + 2*T[2] + 4*T[3] + 7*T[4] + 15*T[5])), 4)*Xpeak[4]/24 + pow((t-(T[1] + 2*T[2] + 4*T[3] + 7*T[4] + 15*T[5])), 3)*(T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12) + pow((t-(T[1] + 2*T[2] + 4*T[3] + 7*T[4] + 15*T[5])), 2)*(-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12) + (t-(T[1] + 2*T[2] + 4*T[3] + 7*T[4] + 15*T[5]))*(pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + (T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + 2*(T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] + pow(T[4], 4)*Xpeak[4]/24 + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/30;
    }
    if (T[1] + 2*T[2] + 4*T[3] + 8*T[4] + 15*T[5] <= t && t <= T[1] + 2*T[2] + 4*T[3] + 8*T[4] + 16*T[5]) {
        return pow((t-(T[1] + 2*T[2] + 4*T[3] + 8*T[4] + 15*T[5])), 5)*Xpeak[5]/120 - pow((t-(T[1] + 2*T[2] + 4*T[3] + 8*T[4] + 15*T[5])), 4)*T[5]*Xpeak[5]/24 + pow((t-(T[1] + 2*T[2] + 4*T[3] + 8*T[4] + 15*T[5])), 3)*pow(T[5], 2)*Xpeak[5]/12 - pow((t-(T[1] + 2*T[2] + 4*T[3] + 8*T[4] + 15*T[5])), 2)*pow(T[5], 3)*Xpeak[5]/12 + (t-(T[1] + 2*T[2] + 4*T[3] + 8*T[4] + 15*T[5]))*pow(T[5], 4)*Xpeak[5]/24 + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(-T[4]*Xpeak[4]/6 - pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + 2*(T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[4], 3) + 2*(T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/12)*pow(T[5], 3) + 2*(T[4]*Xpeak[4]/6 + pow(T[5], 2)*Xpeak[5]/6)*pow(T[5], 3) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (-pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + T[4]*pow(T[5], 3)*Xpeak[5]/6 + pow(T[5], 4)*Xpeak[5]/24)*T[5] + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/2 - T[4]*pow(T[5], 2)*Xpeak[5]/2 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4] - 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (-T[3]*Xpeak[3]/2 - pow(T[4], 2)*Xpeak[4]/4 - T[4]*pow(T[5], 2)*Xpeak[5]/4 - T[4]*T[5]*Xpeak[4]/2 - pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[3], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4]/2 + pow(T[5], 3)*Xpeak[5]/2)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/4 + T[4]*pow(T[5], 2)*Xpeak[5]/4 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[4], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + 11*pow(T[5], 3)*Xpeak[5]/12)*pow(T[5], 2) + (T[3]*Xpeak[3]/2 + pow(T[4], 2)*Xpeak[4]/2 + T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[4]*T[5]*Xpeak[4] + pow(T[5], 3)*Xpeak[5])*pow(T[5], 2) + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4]/2 + 2*T[4]*pow(T[5], 3)*Xpeak[5]/3 + T[4]*pow(T[5], 2)*Xpeak[4]/2 + 7*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4]/6 + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + pow(T[4], 2)*T[5]*Xpeak[4] + 7*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 3*pow(T[4], 2)*T[5]*Xpeak[4] + 3*T[4]*pow(T[5], 3)*Xpeak[5] + 2*T[4]*pow(T[5], 2)*Xpeak[4] + 49*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[2] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 2*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 4*pow(T[4], 2)*T[5]*Xpeak[4] + 4*T[4]*pow(T[5], 3)*Xpeak[5] + 4*T[4]*pow(T[5], 2)*Xpeak[4] + 4*pow(T[5], 4)*Xpeak[5])*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + pow(T[4], 3)*Xpeak[4] + pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 5*pow(T[4], 2)*T[5]*Xpeak[4] + 5*T[4]*pow(T[5], 3)*Xpeak[5] + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 3*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 7*pow(T[4], 2)*T[5]*Xpeak[4] + 41*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 6*T[4]*pow(T[5], 2)*Xpeak[4] + 143*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3]/2 + T[3]*pow(T[4], 2)*Xpeak[4]/2 + T[3]*T[4]*pow(T[5], 2)*Xpeak[5]/2 + T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[3] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 15*pow(T[4], 2)*T[5]*Xpeak[4]/2 + 22*T[4]*pow(T[5], 3)*Xpeak[5]/3 + 15*T[4]*pow(T[5], 2)*Xpeak[4]/2 + 89*pow(T[5], 4)*Xpeak[5]/12)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 11*pow(T[4], 3)*Xpeak[4]/6 + 7*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5]/4 + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 47*T[4]*pow(T[5], 3)*Xpeak[5]/6 + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[4] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 191*pow(T[5], 4)*Xpeak[5]/24)*T[5] + (T[2]*Xpeak[2] + pow(T[3], 2)*Xpeak[3] + T[3]*pow(T[4], 2)*Xpeak[4] + T[3]*T[4]*pow(T[5], 2)*Xpeak[5] + 2*T[3]*T[4]*T[5]*Xpeak[4] + 2*T[3]*T[4]*Xpeak[3] + 2*T[3]*pow(T[5], 3)*Xpeak[5] + 4*T[3]*T[5]*Xpeak[3] + 2*pow(T[4], 3)*Xpeak[4] + 2*pow(T[4], 2)*pow(T[5], 2)*Xpeak[5] + 8*pow(T[4], 2)*T[5]*Xpeak[4] + 8*T[4]*pow(T[5], 3)*Xpeak[5] + 8*T[4]*pow(T[5], 2)*Xpeak[4] + 8*pow(T[5], 4)*Xpeak[5])*T[5] + T[1]*Xpeak[1] + T[4]*pow(T[5], 4)*Xpeak[5]/24 + pow(T[5], 5)*Xpeak[5]/30;
    }
    else {
        return Xpeak[0];
    }
}
